<%@page import="java.util.Date"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>

<script>
	function com_error_config(){
		$(this)
			.attr("bindValidateFailAfterAction","@fun:fun_bindValidateFail()")
			.attr("bindLoginFailAfterAction","@fun:fun_bindLoginFail()")
			.attr("bindAuthorityFailAfterAction","@fun:fun_bindAuthorityFail()")
			.attr("bindErrorFailAfterAction","@fun:fun_bindErrorFail()")
	}

	function fun_bindValidateFail(){
		var output = $(this).outputData();
		$('.js_popup_error')
			.find(".modal-title").text("验证错误")
		.end()
			.find(".modal-body").html(getPropertyCount(output)>1 ? "有多个验证错误，请检查提交内容！" : $.map(output, function(v,k){ return v;}))
		.end()
			.modal('show');
	}
	function fun_bindLoginFail(){
		$(".js_popup_error")
			.find(".modal-title").text("登录错误")
		.end()
			.find(".modal-body").html($(this).outputData())
		.end()
			.modal('show');
	}
	function fun_bindAuthorityFail(){
		$(".js_popup_error")
			.find(".modal-title").text("权限错误")
		.end()
			.find(".modal-body").html($(this).outputData())
		.end()
			.modal('show');
	}
	function fun_bindErrorFail(){
		var output = $(this).outputData();
		$(".js_popup_error")
			.find(".modal-title").text("错误")
		.end()
			.find(".modal-body").html($.map(output, function(v,k){return v;}))
		.end()
			.modal('show');
	}
</script>
		
<!-- S 弹出框 -->
<div class="modal fade js_popup_error">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header" style="background-color: red;">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title">错误</h4>
      </div>
      <div class="modal-body">
        <pre></pre>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
        <!-- <button type="button" class="btn btn-primary">Save changes</button> -->
      </div>
    </div><!-- /.modal-content -->
  </div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<!-- E 弹出框 -->